﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using TPOJ.IMessaging;
using System.Configuration;

namespace TPOJ.MessagingFactory
{
    public static class QueueAccess
    {
        private static readonly string path = ConfigurationManager.AppSettings["Messaging"];

        public static IQueueMessage CreateMessage()
        {
            string className = path + ".QueueMessage";
            return (IQueueMessage)Assembly.Load(path).CreateInstance(className);
        }
    }
}
